var app = getApp()
var fileData = require('../../utils/data.js')
var req = require('../../utils/reqUtils.js')

Page( {
  data: {
      article: {
            id: "1",
            company: "山间清供",
            avatar: "../../images/skilledt_img_01.png",
            nickname: '柿子',
            price: '¥500',
            message: '秋天就该有秋天的样子！',
            distance: '100m'
      }
  },
  onLoad: function (options) { 
    var that =this
    console.log(options.artype)
    req.get('/GetSkilledData', {
      id: options.artype,
      lat:0,
      lon:0
    }, 1)
    .then(res => {
      console.log(res.data)
      that.setData({
        article: res.data
      })
    })
  },
  
  // 预定
  bookTap:function(){
    wx.navigateTo({
      url:'../book/book'
    })
  }
})